﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplication1;

namespace WebApplication2
{
    public partial class Register : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        #region 注册
        protected void Button1_Click(object sender, EventArgs e)
        {
            var name = TextBox1.Text.Trim();
            var age = TextBox2.Text.Trim();
            var height = TextBox3.Text.Trim();
            var sql = string.Format("insert into Girl values('{0}',{1},'{2}')", name, age, height);
            DbHelp.CMD(sql);
            Response.Redirect("Default.aspx");
        }
        #endregion

        #region 取消
        protected void Button2_Click(object sender, EventArgs e)
        {
            Response.Redirect("Default.aspx");
        }
        #endregion

    }
}